package com.frejoys.common.dto.app;

import com.frejoys.common.dto.common.PageDto;
import com.frejoys.common.util.TimeUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author wangzhicheng
 * @version 1.0
 * @date 2024/4/28 14:19
 */
@Data
public class StoreWalletLogPageDto extends PageDto {

    @Schema(type = "Integer", name = "storeId", description = "店铺id", required = true, defaultValue = "1")
    private Integer storeId;

    @Schema(type = "String", name = "storeName", description = "店铺名称", defaultValue = "华为")
    private String storeName;

    @Schema(type = "String", name = "tel", description = "店铺电话", required = true, defaultValue = "1")
    private String tel;

    @Schema(type = "Integer", name = "type", description = "类型：1.用户下单，2.商家提现", defaultValue = "1")
    private Integer type;

    @Schema(type = "Integer", name = "status", description = "状态(商家提现时：0为申请，1为提现成功)：0等待，1.有效", defaultValue = "1")
    private Integer status;

    @Schema(type = "String", name = "startTime", description = "创建开始时间", defaultValue = "2023-11-30 12:00:00")
    private String startTime;

    @Schema(type = "String", name = "endTime", description = "创建结束时间", defaultValue = "2023-11-30 12:00:00")
    private String endTime;

    public Integer getStartTime() {
        return startTime == null ? null : TimeUtil.unixTime(startTime);
    }

    public Integer getEndTime() {
        return endTime == null ? null : TimeUtil.unixTime(endTime);
    }

}
